package com.xdcplus.web.mapper.pm;

import com.xdcplus.mp.mapper.IBaseMapper;
import com.xdcplus.web.common.pojo.entity.pm.PmShiftManage;
import com.xdcplus.web.common.pojo.query.pm.PmShiftManageQuery;
import com.xdcplus.web.common.pojo.vo.pm.PmShiftManageWithPlanVO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 排班管理(PmShiftManage)表数据库访问层
 *
 * @author Fish.Fei
 * @since 2023-02-07 17:06:14
 */
public interface PmShiftManageMapper extends IBaseMapper<PmShiftManage> {

    /**
     * 查询排班管理(PmShiftManage)
     *
     * @param pmShiftManageQuery 排班管理(PmShiftManage)查询
     * @return {@link List<PmShiftManage>}
     */
    List<PmShiftManage> queryPmShiftManage(PmShiftManageQuery pmShiftManageQuery);

    PmShiftManageWithPlanVO queryPmShiftManageByNowTimeAndDate(@Param("nowTime") String nowTime, @Param("date") String date, @Param("shiftType") Long shiftType);

    PmShiftManageWithPlanVO queryPmShiftManageByNowTimeAndDate1(@Param("nowTime") String nowTime, @Param("shiftType") Long shiftType);

    /**
    * @Description 获取当前时间的班次名称
    * @Author Devin.sang
    * @Date  2023/5/9 15:12
    */
    String queryNameByNowTime(String nowTime);

    /**
     * @Description 按照日期获取班次信息
     * @Author Devin.sang
     * @Date  2023/5/11 13:41
     */
    List<PmShiftManage> queryPmShiftManageByTime(@Param("timeString") String timeString,
                                                 @Param("shiftTypes") List<Long> shiftTypes,
                                                 @Param("dataAdjust") Integer dataAdjust);

    List<PmShiftManage> queryAllByShiftType(@Param("shiftType") Long shiftType);


    List<PmShiftManage> getPmShiftByCode(@Param("shiftCode") String shiftCode);


}
